﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Collections;
using System.ComponentModel;

namespace DeviceMonitor.ViewModel
{
    class MonitorViewModel : BaseViewModel
    {
        public ObservableCollection<ItemViewModel> _items = new ObservableCollection<ItemViewModel>();

        public ObservableCollection<ItemViewModel> items
        {
            get { return _items; }
            set
            {
                _items = value;
                RaisePropertyChanged("items");
            }
        }

        public string _groupName;
        public string groupName
        {
            get { return _groupName; }
            set
            {
                if (_groupName != value)
                {
                    _groupName = value;
                    RaisePropertyChanged("groupName");
                }
            }
        }

        public Hashtable devicesTable01 { get; set; }
        public Hashtable devicesTable02 { get; set; }
        public Hashtable devicesTable03 { get; set; }


        private bool _isButtonVisible;
        public bool IsButtonVisible
        {
            get { return _isButtonVisible; }
            set
            {
                _isButtonVisible = value;
                OnPropertyChanged(nameof(IsButtonVisible));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
